let index = 0;
const setup = function(app){
	app.post('/grabGift', (req, res) => {
		res.json({ status: '0', body:{custom: 'response' }});
	});
	app.post('/recommend/activity/entrance.do', (req, res) => {
		res.json({
			"body":{
					"subscribe":0,
					"recommend":{
							"recommendTotal":0,
							"recommendScore":0,
							"firstRecommendTime":null,
							"drawCost":0,
							"drawTimes":13,
							"userId":1
					},
					"user":{
							"userName":"黄耀明",
							"createTime":1492061578000,
							"updateTime":1492064875000,
							"userOpenid":"oclOHuO7gHOHCTx9ZoWIY6RfhznE",
							"userGender":1,
							"userUnionid":null,
							"userId":1,
							"userPhone":null,
							"userImg":"http://wx.qlogo.cn/mmopen/oLU121BePGnibnpdicicslkY6IhkgvKhwvt9Qiarb07y5NBT2ZCljrUibr46AO7a2wJ4esMGsUicgURQJcaKGFicloxLQ/0"
					},
					"secretCode":"3bxBtjdbgqMKdBQE2JFbC6kcspGMu7hX"
			},
			"status":"0",
			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/prizedraw/saveReceiverInfo.do', (req, res) => {
		res.json({
			"status":"0",
			"body":null,
			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/prizedraw/getRechargeCards.do', (req, res) => {
		res.json({
			 "body":{
						"id":1,
						"winId":1,
						"cardSendId":1,
						"cardNo":"1234567890",
						"cardPwd":"123-456-789-012",
						"cardAmount":10,
						"cardDetail":"xxxxxxxxxxxxxxxxxxxxxx"
				},
  		"status":"0",
  		"errorMsg":"操作成功"
		})
	});
	app.post('/recommend/activity/getBindCode.do', (req, res) => {
		res.json({
			"status":"0",
			"body":null,

			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/activity/getBindCode.do', (req, res) => {
		res.json({
			"status":"0",
			"body":null,
			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/activity/bindPhoneNumber.do', (req, res) => {
		setTimeout(() => {
			res.json({
				"status":"0",
				"body":null,
				"errorMsg":"操作成功"
			});
		},5000);

	});
	app.post('/recommend/activity/getRecommendInfoList.do', (req, res) => {
		res.json({
			"body":[
				{
					"userNickname":"张三",
					"userImg":"http://wx.qlogo.cn/mmopen/oLU121BePGnibnpdicicslkY6IhkgvKhwvt9Qiarb07y5NBT2ZCljrUibr46AO7a2wJ4esMGsUicgURQJcaKGFicloxLQ/64",
					"addScore":20,
					"businessTime":20170411130200
				}
			],
			"status":"0",
			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/activity/getRecommendTopList.do', (req, res) => {
		res.json({
			"body":[
				{
					"userName":"黄耀明",
					"userImg":"http://wx.qlogo.cn/mmopen/oLU121BePGnibnpdicicslkY6IhkgvKhwvt9Qiarb07y5NBT2ZCljrUibr46AO7a2wJ4esMGsUicgURQJcaKGFicloxLQ/64",
					"recommendTotal":1,
					"monthRecommendTotal":1
				}
			],
			"status":"0",
			"errorMsg":"操作成功"
		});
	});
	app.post('/recommend/activity/getDrawPrizeRecord.do', (req, res) => {
		index++;
		const record=[];
		for (let i=0;i<index;i++){
			record.push({
				"detailId":i,
				"createTime":1492061578000,
				"prizeName":"动感单车",
				"prizeType":5,
				"status":4,
				"address":"张三,18611110000,广东省广州市萝岗区科学城科学大道中99号科汇金谷"
			});
		}
		res.json({
			"body":{
				"recommendScore":0,
				record
			},
			"status":"0",
			"errorMsg":"操作成功"
		});
	});
};

export default setup;
